<!DOCTYPE html>
<html lang="">

<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">

    <title>安全校验</title>
    <link rel="stylesheet" href="./css/verify.css">
</head>

<body>
<header>
    秒杀安全中心
</header>
<h3>当前操作环境不安全，请滑动滑块验证！</h3>
    <div class="container">
        <div id="captcha" style="position: relative;">
        </div>
    </div>
<div id="msg"></div>

</body>

</html>

<script src="./js/verify.js"></script>
<script>
    captcha.init(document.getElementById('captcha'),function(){
        document.getElementById('msg').innerHTML='验证成功，即将跳转至支付页面';
        setTimeout(() => {
            window.location.href = 'toBuy.html';
            document.getElementById('msg').innerHTML='';
        }, 2000);
    },function(){
        document.getElementById('msg').innerHTML='验证失败';
        setTimeout(() => {
            document.getElementById('msg').innerHTML='';
        }, 1000);
    })
</script>